# Maintainer:
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Leif Warner <abimelech@gmail.com>

pkgname=python-rdflib
pkgver=6.2.0
pkgrel=2
pkgdesc="A Python library for working with RDF, a simple yet powerful language for representing information"
arch=('any')
url="https://github.com/RDFLib/rdflib"
license=('BSD')
depends=('python-isodate' 'python-pyparsing' 'python-setuptools')
optdepends=('python-html5lib: for html support')
checkdepends=('python-pytest-cov' 'python-six' 'python-html5lib' 'python-networkx'
              'python-doctest-ignore-unicode' 'python-pip')
source=(https://github.com/RDFLib/rdflib/archive/$pkgver/$pkgname-$pkgver.tar.gz)
sha512sums=('8177c50e9c2d48859a061dfee24c3560b8f979bc306b3d940a9251ec130e3a324bbad474f4fa7ced5e11522d3bd4e13931461bf106f31177fd972806968d8245')

build() {
  cd rdflib-$pkgver
  python setup.py build
}

check() {
  cd rdflib-$pkgver
  pytest
}

package() {
  cd rdflib-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644  LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
